/* 二次元管理员后台样式 */
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

:root {
    --primary: #ff6b8b;
    --primary-light: #ff9fb0;
    --secondary: #8a5cf2;
    --secondary-light: #b594ff;
    --accent: #ffb74d;
    --background: #fff0f3;
    --surface: rgba(255, 255, 255, 0.85);
    --text: #5d4037;
    --border: #ffccd5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'ZCOOL KuaiLe', 'Ma Shan Zheng', 'Microsoft YaHei', cursive, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text);
    background-image: 
        radial-gradient(var(--primary-light) 2px, transparent 2px),
        radial-gradient(var(--secondary-light) 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

#background-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: -1;
        background-image: url('./admin.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        /* 添加灰色遮罩和高斯模糊 */
        background-color: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

/* 登录页面样式 */
.login-container {
    max-width: 450px;
    margin: 80px auto;
    padding: 30px;
    background-color: var(--surface);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(255, 107, 139, 0.2);
    position: relative;
    overflow: hidden;
    border: 3px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-container::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background-color: var(--accent);
    border-radius: 50%;
    opacity: 0.2;
    z-index: -1;
    animation: float 6s ease-in-out infinite;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 2rem;
    text-shadow: 2px 2px 0px var(--primary-light);
    letter-spacing: 2px;
}

/* 仪表板样式 */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.header h1 {
    color: var(--primary);
    font-size: 2rem;
    text-shadow: 2px 2px 0px var(--primary-light);
    letter-spacing: 2px;
}

/* 按钮样式 */
.btn-login, .logout-btn, .smtp-btn, .search-btn, .reset-btn, .delete-btn, .view-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login {
    background-color: var(--primary);
    color: white;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(255, 107, 139, 0.3);
}

.btn-login:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 139, 0.4);
}

.logout-btn {
    background-color: var(--primary);
    color: white;
    margin-left: 10px;
    box-shadow: 0 4px 8px rgba(255, 107, 139, 0.3);
}

.logout-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 107, 139, 0.4);
}

.smtp-btn {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 8px rgba(138, 92, 242, 0.3);
}

.smtp-btn:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(138, 92, 242, 0.4);
}

.search-btn {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 8px rgba(138, 92, 242, 0.3);
}

.search-btn:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(138, 92, 242, 0.4);
}

.reset-btn {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 183, 77, 0.3);
}

.reset-btn:hover {
    background-color: #ffcc80;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 183, 77, 0.4);
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.delete-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
}

.view-btn {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 8px rgba(138, 92, 242, 0.3);
}

.view-btn:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(138, 92, 242, 0.4);
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.7);
    color: var(--text);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(255, 107, 139, 0.2);
}

/* 表格样式 */
.ticket-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--border);
}

.ticket-table th,
.ticket-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.ticket-table th {
    background-color: rgba(255, 107, 139, 0.1);
    color: var(--primary);
    font-weight: bold;
}

.ticket-table tr:last-child td {
    border-bottom: none;
}

.ticket-table tr:hover {
    background-color: rgba(255, 107, 139, 0.05);
}

/* 消息样式 */
.error-message {
    color: #e74c3c;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
    padding: 10px;
    border-radius: 12px;
    background-color: rgba(231, 76, 60, 0.1);
}

.success-message {
    color: #2ecc71;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.1rem;
    padding: 12px;
    border-radius: 12px;
    background-color: rgba(46, 204, 113, 0.1);
}

/* 搜索容器 */
.search-container {
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-container input[type="text"] {
    padding: 12px 15px;
    flex: 1;
    min-width: 250px;
    border: 2px solid var(--border);
    border-radius: 50px;
}

/* 动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(10deg);
    }
}

/* 装饰元素 */
.heart {
    color: var(--primary);
    animation: heartbeat 1.5s infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    .ticket-table {
        font-size: 0.9rem;
    }
    .ticket-table th, .ticket-table td {
        padding: 10px;
    }
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 二次元装饰元素 */
.anime-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0.15;
}

.login-container .anime-decoration {
    top: -30px;
    left: -30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,10 C70,10 85,25 85,50 C85,75 70,90 50,90 C30,90 15,75 15,50 C15,25 30,10 50,10 Z M50,30 C40,30 35,40 35,50 C35,60 40,70 50,70 C60,70 65,60 65,50 C65,40 60,30 50,30 Z" fill="%23ff6b8b" /></svg>');
}

.header .anime-decoration {
    top: -20px;
    right: -20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M50,10 C70,10 85,25 85,50 C85,75 70,90 50,90 C30,90 15,75 15,50 C15,25 30,10 50,10 Z M50,30 C40,30 35,40 35,50 C35,60 40,70 50,70 C60,70 65,60 65,50 C65,40 60,30 50,30 Z" fill="%238a5cf2" /></svg>');
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 图片预览 */
.preview-image {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid var(--border);
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a {
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 50px;
    background-color: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}